#!/bin/sh

# user.js hash: {{ include ".mozilla/user.js" | sha256sum }}

config="$HOME/.mozilla/firefox"

if [ -d "$config" ]; then
    profile="$(sed -n "s/^Default=//p" "$config/installs.ini")"

    cp -f {{ joinPath .chezmoi.sourceDir ".mozilla" "user.js" }} "$config/$profile/user.js"
fi
